//
//  LoveListenModelFirst.m
//  XYFMApp
//
//  Created by 岁变 on 16/9/19.
//  Copyright © 2016年 岁变. All rights reserved.
//

#import "LoveListenModelFirst.h"
#import "XYMacro.h"

@implementation LoveListenModelFirst

- (void)setValue:(id)value forKey:(NSString *)key {
    if ([key isEqualToString:@"status"]) {
        _status = [LoveListenModelFirstStatus modelWithDictionary:value];
    }
    if ([key isEqualToString:@"paginated"]) {
        _paginated = [LoveListenModelFirstPaginated modelWithDictionary:value];
    }
    if ([key isEqualToString:@"data"]) {
        NSMutableArray *mArr = [NSMutableArray array];
        if ([value isKindOfClass:[NSArray class]]) {
            for (NSDictionary *dic in value) {
                LoveListenModelFirstData *model = [LoveListenModelFirstData modelWithDictionary:dic];
                [mArr addObject:model];
            }
            _data = mArr;
        }
        else {
            _data = mArr;
        }
    }
}

@end
